<template>
  <div class="block">
    <el-carousel trigger="click" height="150px" :interval="3000">
      <el-carousel-item v-for="item in list" :key="item.image">
        <img :src="item.image" :alt="item.title">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import axios from "axios"
export default {
  name: "carousel",
  data() {
    return {
        list:[]
    };
  },
  mounted() {
     axios({method:'get',url:'/api/home/index/slide',params:{token:'1ec949a15fb709370f'}}).then((response)=>{
        this.list=response.data.data 
     },error=>{
        console.log(error.message)
     })
  },
};
</script>

<style scoped>
img{
    width: 100%;
    height: 100%;
}
</style>